define("common/kss", [
		"../../js/common/componts",
		"../../js/tpl/rightmenu.html.js",
        "../../js/tpl/ryxxlb.html.js",
        "../../js/tpl/rygkcsxx.html.js",
        "../../js/tpl/lshj.html.js",
	],
function(require) {	
	var comonts=require("../../js/common/componts");
	var jbxxColumns = [
		{								
			field: 'ooid',
	        title: '',
	        width: '',
	        formatter: function(value, rowData, rowIndex){
	            return '<input type="radio" name="ryRadio" id="ryRadio"' + rowIndex + 'value="' + rowData.ooid + '" />';
	        }
		},
		{
			field : 'fxpgLastfxpgfz',
			title : '风险趋势图',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ (row.fxpgLastfxpgfz == null ? ""
								: row.fxpgLastfxpgfz)
						+ '>'
						+ (row.fxpgLastfxpgfz == null ? ""
								: row.fxpgLastfxpgfz)
						+ '</span>'
			}
		},
		{
			field : 'snbh',
			title : '人员编号',
			width : 200,
			hidden : false,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ (row.snbh == null ? ""
								: row.snbh)
						+ '>'
						+ (row.rybh == null ? ""
								: row.snbh) + '</span>'
			}
		},
		{
			field : 'xm',
			title : '姓名',
			width : 200,
			hidden : false,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ (row.xm == null ? "" : row.xm)
						+ '>'
						+ (row.xm == null ? "" : row.xm)
						+ '</span>'
			}
		},
		{
			field : 'sykzrq',
			title : '收押开证日期',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title=' + value + '>'
						+ value + '</span>'
			}
		},
		{
			field : 'jsh',
			title : '监室号',
			width : 200,
			hidden : false,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ (row.jsh == null ? ""
								: row.jsh)
						+ '>'
						+ (row.jsh == null ? ""
								: row.jsh) + '</span>'
			}
		},
		{
			field : 'bahjString',
			title : '办案环节',
			width : 200,
			hidden : false,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value + '</span>'
			}
		},
		{
			field : 'rsrq',
			title : '入所时间',
			width : 200,
			hidden : false,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title=' + value + '>'
						+ value + '</span>'
			}
		},
		{
			field : 'gyqx',
			title : '关押期限',
			width : 200,
			hidden : false,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title=' + value + '>'
						+ value + '</span>'
			}
		},
		{
			field : 'badw',
			title : '办案单位',
			width : 200,
			hidden : false,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value + '</span>'
			}
		},
		{
			field : 'xbString',
			title : '性别',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value
						+ '</span>'
			}
		},
		{
			field : 'dwlxString',
			title : '单位类型',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value
						+ '</span>'
			}
		},
		{
			field : 'rsxzString',
			title : '入所性质',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value + '</span>'
			}
		},
		{
			field : 'csrq',
			title : '出生日期',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title=' + value + '>'
						+ value + '</span>'
			}
		},
		{
			field : 'zjlxString',
			title : '证件类型',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value + '</span>'
			}
		},
		{
			field : 'zjh',
			title : '证件号',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ (row.zjh == null ? ""
								: row.zjh)
						+ '>'
						+ (row.zjh == null ? ""
								: row.zjh) + '</span>'
			}
		},
		{
			field : 'hjdString',
			title : '户籍地',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value + '</span>'
			}
		},
		{
			field : 'xzdString',
			title : '现住地',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value + '</span>'
			}
		},
		{
			field : 'hyzkString',
			title : '婚姻状况',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value + '</span>'
			}
		},
		{
			field : 'mzString',
			title : '民族',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value
						+ '</span>'
			}
		},
		{
			field : 'gjString',
			title : '国籍',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value
						+ '</span>'
			}
		},
		{
			field : 'whcdString',
			title : '文化程度',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value + '</span>'
			}
		},
		{
			field : 'zyString',
			title : '职业',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value
						+ '</span>'
			}
		},
		{
			field : 'sfString',
			title : '身份',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value
						+ '</span>'
			}
		},
		{
			field : 'tssfString',
			title : '特殊身份',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value + '</span>'
			}
		},
		{
			field : 'cypjfz',
			title : '处遇评鉴分值',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value + '</span>'
			}
		},
		{
			field : 'jyrq',
			title : '羁押日期',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title=' + value + '>'
						+ value + '</span>'
			}
		},
		{
			field : 'ayString',
			title : '主要案由',
			width : 200,
			hidden : true,
			sortable : 'true',
			formatter : function(value, row, index) {
				return '<span title='
						+ value
						+ '>'
						+ value
						+ '</span>'
			}
		}];

	var sbxt = function(id){
		var row = $('#'+id).datagrid('getRows');
		var data = $('#'+id).datagrid('getData');
		$('#sbxt .datagrid-body tr.datagrid-row').mouseover(function(e){
			var trId = $(this).attr("id");
			//var index = trId.trim().replace('datagrid-row-r1-2-','');
			var index = trId.substring(trId.length-1,trId.length);
			
			var zdry_flag ;
			var ygry_flag ;
			var jj_flag ;
			var bahj_flag ;
			var azb_flag ;
			var ldf_flag ;
			var jb_flag ;
			//var emlx_flag ;
			var crjbj_flag ;
			var jkzk_flag ;
			
			var zdry_content ;
			var	ygry_content ;
			var	jj_content ;
			var	bahj_content ;
			var	azb_content ;
			var	jb_content ;
			//var	emlx_content ;
			var	ldf_content ;
			var	crjbj_content ;
			var	jkzk_content ;
			
			for (var i = 0; i < row.length; i++) {

				if (row[i].zdry == '2') {
					zdry_flag = 1;
				}else if (row[i].zdry == '1') {
					zdry_flag = 2;
				}else if (row[i].zdry == '0') {
					zdry_flag = 3;
				}else if (row[i].zdry == '9') {
					zdry_flag = 4;
				}
				
				if (row[i].ygry == '04') {
					ygry_flag = 1;
				}else if (row[i].ygry == '03') {
					ygry_flag = 2;
				}else if (row[i].ygry == '02') {
					ygry_flag = 3;
				}else if (row[i].ygry == '01') {
					ygry_flag = 4;
				}
				
				if (row[i].jj == '04') {
					jj_flag = 1;
				}else if (row[i].jj == '03') {
					jj_flag = 2;
				}else if (row[i].jj == '02') {
					jj_flag = 3;
				}else if (row[i].jj == '01') {
					jj_flag = 4;
				}
				
				if (row[i].bahj == '36' ) {
					bahj_flag = 1;
				}else if (row[i].bahj == '12' ){
					bahj_flag = 2;
				}else if (row[i].bahj == '14' ){
					bahj_flag = 3;
				}else if (row[i].bahj == '22' ){
					bahj_flag = 4;
				}else if (row[i].bahj == '24' ){
					bahj_flag = 5;
				}else if (row[i].bahj == '32' ){
					bahj_flag = 6;
				}else if (row[i].bahj == '34' ){
					bahj_flag = 7;
				}else if (row[i].bahj == '11' ){
					bahj_flag = 8;
				}else if (row[i].bahj == '13' ){
					bahj_flag = 9;
				}else if (row[i].bahj == '21' ){
					bahj_flag = 10;
				}else if (row[i].bahj == '23' ){
					bahj_flag = 11;
				}else if (row[i].bahj == '33' ){
					bahj_flag = 12;
				}else if (row[i].bahj == '35' ){
					bahj_flag = 13;
				}else if (row[i].bahj == '99' ){
					bahj_flag = 14;
				}else if (row[i].bahj == '31' ){
					bahj_flag = 15;
				}
				
				if (row[i].azb == '1') {
					azb_flag = 1;
				}else if (row[i].azb == '0') {
					azb_flag = 2;
				}
				
				if (row[i].jb == '04') {
					jb_flag = 1;
				}else if (row[i].jb == '03') {
					jb_flag = 2;
				}else if (row[i].jb == '02') {
					jb_flag = 3;
				}else if (row[i].jb == '01') {
					jb_flag = 4;
				}
				
				/*if (row[i].emlx == '01') {
					emlx_flag = 1;
				}else if (row[i].emlx == '02') {
					emlx_flag = 2;
				}else if (row[i].emlx == '03') {
					emlx_flag = 3;
				}else if (row[i].emlx == '10') {
					emlx_flag = 4;
				}else if (row[i].emlx == '20') {
					emlx_flag = 5;
				}else if (row[i].emlx == '30') {
					emlx_flag = 6;
				}else if (row[i].emlx == '12') {
					emlx_flag = 7;
				}*/
				
				if (row[i].ldf == '04') {
					ldf_flag = 1;
				}else if (row[i].ldf == '03') {
					ldf_flag = 2;
				}else if (row[i].ldf == '02') {
					ldf_flag = 3;
				}else if (row[i].ldf == '01') {
					ldf_flag = 4;
				}
				
				if (row[i].crjbj == '01') {
					crjbj_flag = 1;
				}else if (row[i].crjbj == '02') {
					crjbj_flag = 2;
				}else if (row[i].crjbj == '03') {
					crjbj_flag = 3;
				}else if (row[i].crjbj == '04') {
					crjbj_flag = 4;
				}else if (row[i].crjbj == '05') {
					crjbj_flag = 5;
				}else if (row[i].crjbj == '06') {
					crjbj_flag = 6;
				}else if (row[i].crjbj == '07') {
					crjbj_flag = 7;
				}else if (row[i].crjbj == '08') {
					crjbj_flag = 8;
				}else if (row[i].crjbj == '09') {
					crjbj_flag = 9;
				}

				if (row[i].jkzk == '1') {
					jkzk_flag = 1;
				}else if (row[i].jkzk == '2') {
					jkzk_flag = 2;
				}else if (row[i].jkzk == '3') {
					jkzk_flag = 3;
				}else if (row[i].jkzk == '4') {
					jkzk_flag = 4;
				}else if (row[i].jkzk == '5') {
					jkzk_flag = 5;
				}
				
				
				var _zdry_content = '<li id="zdry" style="margin-bottom:5px;list-style-type:none;"><a><img src="../images/zttb/zdry'+ 
					zdry_flag + '.png" height="17" width="17"/>(重点人员)</a>&nbsp'+row[i].zdryString+'<span hidden="true">'+row[i].zdry+'</span></li>';
			
				var _ygry_content = '<li  id="ygry" style="margin-bottom:5px;list-style-type:none;"><a><img src="../images/zttb/ygry'+
					ygry_flag + '.png" height="17" width="17"/>(严管人员)</a>&nbsp'+row[i].ygryString+'<span hidden="true">'+row[i].ygry+'</span></li>';
				
				var _jj_content = '<li  id="jj" style="margin-bottom:5px;list-style-type:none;"><a><img src="../images/zttb/xjbzw'+ 
					jj_flag + '.png" height="17" width="17"/>(械具)</a>&nbsp'+row[i].jjString+'<span hidden="true">'+row[i].jj+'</span></li>';
				
				var _bahj_content = '<li id="bahj" style="margin-bottom:5px;list-style-type:none;"><a><img src="../images/zttb/bahj'+ 
					bahj_flag + '.png" height="17" width="17"/>(办案环节)</a>&nbsp'+row[i].bahjString+'<span hidden="true">'+row[i].bahj+'</span></li>';
				
				var _azb_content = '<li id="azb" style="margin-bottom:5px;list-style-type:none;"><a><img src="../images/zttb/azb'+ 
					azb_flag + '.png" height="17" width="17"/>(艾滋病)</a>&nbsp'+row[i].azbString+'<span hidden="true">'+row[i].azb+'</span></li>';
				
				var _jb_content = '<li  id="jb" style="margin-bottom:5px;list-style-type:none;"><a><img src="../images/zttb/jbbzw'+ 
					jb_flag + '.png" height="17" width="17"/>(禁闭)</a>&nbsp'+row[i].jbString+'<span hidden="true">'+row[i].jb+'</span></li>';
				
				/*var _emlx_content = '<li  id="emlx" style="margin-bottom:5px;list-style-type:none;"><a><img src="../images/zttb/emlx'+ 
					emlx_flag + '.png" height="17" width="17"/>(耳目类型)</a>&nbsp'+row[i].emlxString+'<span hidden="true">'+row[i].emlx+'</span></li>';*/
				
				var _ldf_content = '<li id="ldf" style="margin-bottom:5px;list-style-type:none;"><a><img src="../images/zttb/ldfbz'+ 
					ldf_flag + '.png" height="17" width="17"/>(劳动犯)</a>&nbsp'+row[i].ldfString+'<span hidden="true">'+row[i].ldf+'</span></li>';
				
				var _crjbj_content = '<li id="crjbj" style="margin-bottom:5px;list-style-type:none;"><a><img src="../images/zttb/crsbz'+ 
					crjbj_flag + '.png" height="17" width="17"/>(出入监标志)</a>&nbsp'+row[i].crjbjString+'<span hidden="true">'+row[i].crjbj+'</span></li>';
				
				var _jkzk_content = '<li id="jkzk" style="margin-bottom:5px;list-style-type:none;"><a><img src="../images/zttb/jkqk'+ 
					jkzk_flag + '.png" height="17" width="17"/>(健康状况)</a>&nbsp'+row[i].jkzkString+'<span hidden="true">'+row[i].jkzk+'</span></li>';

				if (row[i].zdry == '2') {
					zdry_content = _zdry_content;
				}else if (row[i].zdry == '1') {
					zdry_content = _zdry_content;
				}else if (row[i].zdry == '0') {
					zdry_content = _zdry_content;
				}else if (row[i].zdry == '9') {
					zdry_content = _zdry_content;
				}else if (row[i].zdry == '') {
					zdry_content = '';
				}else {
					zdry_content = '';
				}
				
				if (row[i].ygry == '04') {
					ygry_content = _ygry_content;
				}else if (row[i].ygry == '03') {
					ygry_content = _ygry_content;
				}else if (row[i].ygry == '02') {
					ygry_content = _ygry_content;
				}else if (row[i].ygry == '01') {
					ygry_content = _ygry_content;
				}else if (row[i].ygry == '') {
					ygry_content = '';
				}else {
					ygry_content = '';
				}
				
				if (row[i].jj == '04') {
					jj_content = _jj_content;
				}else if (row[i].jj == '03') {
					jj_content = _jj_content;
				}else if (row[i].jj == '02') {
					jj_content = _jj_content;
				}else if (row[i].jj == '01') {
					jj_content = _jj_content;
				}else if (row[i].jj == '') {
					jj_content = '';
				}else {
					jj_content = '';
				}
				
				if (row[i].bahj == '36' ) {
					bahj_content = _bahj_content;
				}else if (row[i].bahj == '12' ){
					bahj_content = _bahj_content;
				}else if (row[i].bahj == '14' ){
					bahj_content = _bahj_content;
				}else if (row[i].bahj == '22' ){
					bahj_content = _bahj_content;
				}else if (row[i].bahj == '24' ){
					bahj_content = _bahj_content;
				}else if (row[i].bahj == '32' ){
					bahj_content = _bahj_content;
				}else if (row[i].bahj == '34' ){
					bahj_content = _bahj_content;
				}else if (row[i].bahj == '11' ){
					bahj_content = _bahj_content;
				}else if (row[i].bahj == '13' ){
					bahj_content = _bahj_content;
				}else if (row[i].bahj == '21' ){
					bahj_content = _bahj_content;
				}else if (row[i].bahj == '23' ){
					bahj_content = _bahj_content;
				}else if (row[i].bahj == '33' ){
					bahj_content = _bahj_content;
				}else if (row[i].bahj == '35' ){
					bahj_content = _bahj_content;
				}else if (row[i].bahj == '99' ){
					bahj_content = _bahj_content;
				}else if (row[i].bahj == '31' ){
					bahj_content = _bahj_content;
				}else if (row[i].bahj == '') {
					bahj_content = '';
				}else {
					bahj_content = '';
				}
				
				if (row[i].azb == '1') {
					azb_content = _azb_content;
				}else if (row[i].azb == '0') {
					azb_content = _azb_content;
				}else if (row[i].azb == '') {
					azb_content = '';
				}else {
					azb_content = '';
				}
				
				if (row[i].jb == '04') {
					jb_content = _jb_content;
				}else if (row[i].jb == '03') {
					jb_content = _jb_content;
				}else if (row[i].jb == '02') {
					jb_content = _jb_content;
				}else if (row[i].jb == '01') {
					jb_content = _jb_content;
				}else if (row[i].jb == '') {
					jb_content = '';
				}else {
					jb_content = '';
				}
				
				/*if (row[i].emlx == '01') {
					emlx_content = _emlx_content;
				}else if (row[i].emlx == '02') {
					emlx_content = _emlx_content;
				}else if (row[i].emlx == '03') {
					emlx_content = _emlx_content;
				}else if (row[i].emlx == '10') {
					emlx_content = _emlx_content;
					//emlx_content = '';
				}else if (row[i].emlx == '20') {
					emlx_content = _emlx_content;
					//emlx_content = '';
				}else if (row[i].emlx == '30') {
					emlx_content = _emlx_content;
					//emlx_content = '';
				}else if (row[i].emlx == '12') {
					emlx_content = _emlx_content;
				}else if (row[i].emlx == '') {
					emlx_content = '';
				}else {
					emlx_content = '';
				}*/
				
				if (row[i].ldf == '04') {
					ldf_content = _ldf_content;
				}else if (row[i].ldf == '03') {
					ldf_content = _ldf_content;
				}else if (row[i].ldf == '02') {
					ldf_content = _ldf_content;
				}else if (row[i].ldf == '01') {
					ldf_content = _ldf_content;
				}else if (row[i].ldf == '') {
					ldf_content = '';
				}else {
					ldf_content = '';
				}
				
				if (row[i].crjbj == '01') {
					crjbj_content = _crjbj_content;
				}else if (row[i].crjbj == '02') {
					crjbj_content = _crjbj_content;
				}else if (row[i].crjbj == '03') {
					crjbj_content = _crjbj_content;
				}else if (row[i].crjbj == '04') {
					crjbj_content = _crjbj_content;
				}else if (row[i].crjbj == '05') {
					crjbj_content = _crjbj_content;
				}else if (row[i].crjbj == '06') {
					crjbj_content = _crjbj_content;
				}else if (row[i].crjbj == '07') {
					crjbj_content = _crjbj_content;
				}else if (row[i].crjbj == '08') {
					crjbj_content = _crjbj_content;
				}else if (row[i].crjbj == '09') {
					crjbj_content = _crjbj_content;
				}else if (row[i].crjbj == '') {
					crjbj_content = '';
				}else {
					crjbj_content = '';
				}

				if (row[i].jkzk == '1') {
					jkzk_content = _jkzk_content;
				}else if (row[i].jkzk == '2') {
					jkzk_content = _jkzk_content;
				}else if (row[i].jkzk == '3') {
					jkzk_content = _jkzk_content;
				}else if (row[i].jkzk == '4') {
					jkzk_content = _jkzk_content;
				}else if (row[i].jkzk == '5') {
					jkzk_content = _jkzk_content;
				}else if (row[i].jkzk == '') {
					jkzk_content = '';
				}else {
					jkzk_content = '';
				}
				
				
				if (index == i) {
					
					$('#sbxt .datagrid-body tr.datagrid-row').tooltip({
						showDelay : 1000,
						trackMouse: true,
						content : '<div >'+
						 			'<div class="top" style="font-size: 14px;margin-bottom: 3px;text-align:center"><strong>人员状态</strong></div>'+
					 				'<ul style="float:left;margin-left:10px;margin-right:20px;margin-top:20px;column-count:2;column-gap:60px;">'+
						 				zdry_content +
						 				ygry_content +
						 				jj_content +
						 				bahj_content +
						 				azb_content +
						 				jb_content +
						 				//emlx_content +
						 				ldf_content +
						 				crjbj_content +
						 				jkzk_content +
					 				'</ul>'+
					 			'</div>',
					});
				}
			}
		})
	}
	
	
	var rightMenuRybh = "";
	
	var _initJbxx=function(id,options){
		var selectid;
		var _title=options['title']!=undefined?options['title']:'人员基本信息';
		var _width=options['width']!=undefined?options['width']:'100%';
		var _height=options['height']!=undefined?options['height']:'280px';
		var _fitColumns=options['fitColumns']!=undefined?options['fitColumns']:true;
		var _method=options['method']!=undefined?options['method']:'post';
		var _border=options['border']!=undefined?options['border']:false;
		var _singleSelect=options['singleSelect']!=undefined?options['singleSelect']:true;
		var _fit=options['fit']!=undefined?options['fit']:true;
		var _tools=options['tools']!=undefined?options['tools']:'';
		var _onSelect=options['onSelect']!=undefined?options['onSelect']:function(rowIndex, rowData){};
		var _toolbar=options['toolbar']!=undefined?options['toolbar']:'#toolbar';
		var _url=options['url']!=undefined?options['url']:'';
		var _firstLoad=options['firstLoad']!=undefined?options['firstLoad']:false;
		var _columns=options['columns']!=undefined?options['columns']:jbxxColumns;
		var _idField=options['idField']!=undefined?options['idField']:'id';
		var _loadMsg=options['loadMsg']!=undefined?options['loadMsg']:'加载中, 请  稍  等  …';
		var _pagination=options['pagination']!=undefined?options['pagination']:true;
		var _detailFormatter=options['detailFormatter']!=undefined?options['detailFormatter']:function(index, rowData) {
			return '<table  style="height:60px;width:100%"><tr><td>户籍地详细地址：'
			+ (rowData.hjszd == null ? ""
					: rowData.hjszd)
			+ '</td></tr><tr><td>现住地详细地址:'
			+ (rowData.xzd == null ? "" : rowData.xzd)
			+ '</td></tr><tr><td>办案单位:'
			+ (rowData.badw == null ? "" : rowData.badw)
			+ '</td></tr><tr><td>简要案情:'
			+ (rowData.aq == null ? "" : rowData.aq)
			+ '</td></tr></table>'
		};
		//鼠标悬浮显示人员状态
		var _onLoadSuccess=options['onLoadSuccess']!=undefined?options['onLoadSuccess']:function(data){
			if(data.total>0){//加载完毕后获取所有的checkbox遍历
				$('#'+id).datagrid("selectRow", 0);
				$("input[name='ryRadio']")[0].checked = true;
				sbxt(id);
			}			
	     };
		var _rowStyler=options['rowStyler']!=undefined?options['rowStyler']:function(index, record){					
			if(record.fxdj==3){
				return  'color:#006e44;';
			}else if(record.fxdj==2){
				return  'color:#ffab2e;';
			}else if(record.fxdj==1){
				return  'color:#e9540e;';
			}
		};
		var _onClickRow=options['onClickRow']!=undefined?options['onClickRow']:function (rowIndex, rowData) {
			if(selectid!=rowData.id){
	   			$("input[name='ryRadio']")[rowIndex].checked = true;
	   			selectid=rowData.id;
	   		}else{		   			
	   			$("#"+id).datagrid("unselectRow",rowIndex);
		        $("input[name='ryRadio']")[rowIndex].checked = false;
		        $('#'+id).datagrid('clearSelections');
		        selectid="";
	   		}
		};
		var _queryParams=options['queryParams']!=undefined?options['queryParams']:{
			"pageSize" : function() {
				return $('#'+id).datagrid("getPager")
						.pagination("options").pageSize;
			},
			"pageIndex" : function() {
				return $('#'+id).datagrid("getPager")
						.pagination("options").pageNumber;
			}
		};
		//右键时触发事件
		var _onRowContextMenu=options['onRowContextMenu']!=undefined?options['onRowContextMenu']:function(e, rowIndex, rowData) { 
			rightMenuRybh = rowData.rybh==undefined?"":rowData.rybh;
			if($('#menu')[0]==undefined){
				//_initJbxxRightMenu("rightmenu");
				var tmp= require("../../js/tpl/rightmenu.html");
				var htmlcompile = template.compile(tmp);
				var html = htmlcompile({});
				$("#rightmenu").html(html);
				$.parser.parse($("#rightmenu"));
			}			
			//三个参数：rowIndex 当前点击时所在行的索引，rowData 当前行的数据
			if(rowData){
				e.preventDefault(); //阻止浏览器捕获右键事件
                $(this).datagrid("clearSelections"); //取消所有选中项
                $("input[name='ryRadio']")[rowIndex].checked = true;
                $(this).datagrid("selectRow", rowIndex); //根据索引选中该行
                //jbxxDetailAssignment($(this).datagrid("getSelected"));
                $('#menu').menu('show', {
                	//显示右键菜单
                    left: e.pageX,//在鼠标点击处显示菜单
                    top: e.pageY,
                });
                $('#menu').menu({
                	 onShow:function(){
                 		//以下是禁用了右键菜单的其它及格选项
                 		//$("#see_rygk").css("pointer-events","none");
                 		$("#see_ccic").css("pointer-events","none");
                 		$("#see_qtyw").css("pointer-events","none");
                     },
                     onClick:function(item){
                     	_clickJbxxRightMenu(item,rowData);
                     },
                });
			}
        };
        var _onDblClickRow=options['onDblClickRow']!=undefined?options['onDblClickRow']:function (rowIndex, rowData) {};
		comonts.initTable(id,{	
			title : _title,
			width : _width,
			height : _height,
			fitColumns : _fitColumns,
			method:_method,
			border:_border,
            firstLoad:_firstLoad,
			singleSelect:_singleSelect,
			fit:_fit,
			tools:_tools,
	        onSelect:_onSelect,
	        toolbar:_toolbar,
	        url:_url,
			columns : _columns,
			idField : _idField,
			loadMsg : _loadMsg,
			pagination : _pagination,
			detailFormatter : _detailFormatter,
			onLoadSuccess: _onLoadSuccess,
		    rowStyler:_rowStyler,
			onClickRow: _onClickRow,	
		    onDblClickRow: _onDblClickRow,
			queryParams : _queryParams,
			onRowContextMenu: _onRowContextMenu
		});
		var opts = $('#'+id).datagrid("options");//点击查询加载数据
		opts.url = _url;
        /*setTimeout( function(){
            _initRyxxxx();
        }, 2 * 100 );*/
	}
	var _initJsTree=function(id,jbxxid,options){
		var _url=options['url']!=undefined?options['url']:"/jls_jq/getJqTree";
		var _method=options['method']!=undefined?options['method']:"get";
		var _loadFilter=options['loadFilter']!=undefined?options['loadFilter']:function(data) {
			if (data.success) {
				return data.result;
			} else {
				$.messager.alert("提示", "监区树数据获取失败", "info");
				return {};
			}
		};
		$('#'+id).tree({
			url : _url,
			method : _method,
			loadFilter : _loadFilter,
			//鼠标移上事件获取获取监区人数
			onLoadSuccess:function(node,data){
				$(".tree-hit").parent().addClass("treet");
				$(".tree-indent").parent().addClass("treet1");
				var rows = $('#jqjsTree').tree('getRoots');
				var row = $('#jqjsTree').tree('getRoot');
				var childrenNodes = $('#jqjsTree').tree('getChildren',row.target);
				var trId;
				var trrId;
				$('#'+id+" .treet").bind("mouseover",function(){
					trId=$(this).attr("id");
					trId = trId.replace("_easyui_tree_","");
					for(var i=0;i<rows.length;i++){
		 				if(trId==i){
		 					var text1 =rows[i-1].text;
		 					var	num=text1.substring(text1.length-3,text1.length-2);		 					
		 					$('#'+id+' .treet').tooltip({
			 					trackMouse:'true',
			 					content : '<div style="height: 50px;width:100px">'+
		 							  '<div class="top" style="font-size: 12px;margin-bottom: 5px;"></div>'+
			 							  '<div>人数:'+num+'人</div></div>'
			 					});
		 					
			 				}
			 			}
				});
		
				$('#'+id+" .treet1").bind("mouseover",function(){
					trrId=$(this).attr("id");
					trrId = trrId.replace(trrId,"");
					for(var i=0;i<rows.length;i++){
						if(trId==i){
							var text1 =rows[i-1].text;
							var	num=text1.substring(text1.length-3,text1.length-2);
							$('.treet1').tooltip({
								trackMouse:'true',
								content : '<div style="height: 50px;width:100px">'+
	 							  	'<div class="top" style="font-size: 12px;margin-bottom: 5px;"></div>'+
		 							  	'<div>人数:'+num+'人</div></div>'
		 						});
		 					}
		 				}
					});
				},
			onClick : function(node) {
				var data = {};
				var pageSize = $('#' +jbxxid).datagrid("getPager").pagination("options").pageSize;
				var pageIndex = $('#'+jbxxid).datagrid("getPager").pagination("options").pageNumber; 
				var class_rybh = $('#'+jbxxid).parent().parent().find('.s_rybh');
				var class_xm = $('#'+jbxxid).parent().parent().find('.s_xm');
				if (class_rybh.length > 0) {
					var s_rybh= class_rybh.textbox('getValue');
					var s_xm= class_xm.textbox('getValue');
				}else{
					var s_rybh= $("#s_rybh").textbox('getValue');
					var s_xm= $("#s_xm").textbox('getValue');
				}
				data = {
						 'snbh': s_rybh,
						 'xm': s_xm,
				}
				var s_yylx= $("#s_yylx").val();
				if(s_yylx != null || s_yylx != undefined){
					data["yylx"] = s_yylx; 
				}
				if (node.id.length == "2") {
					data["jqh"] = node.id; 
				} else {
					data["jsh"] = node.id;
				}		
				$('#'+jbxxid).datagrid('clearSelections');
				$('#'+jbxxid).datagrid('load', data);
			}
		});
	}
	//流程监区树
	var _initLcJsTree=function(id,tableId,options){
		var _url=options['url']!=undefined?options['url']:"/jls_jq/getJqTree";
		var _method=options['method']!=undefined?options['method']:"get";
		var _loadFilter=options['loadFilter']!=undefined?options['loadFilter']:function(data) {
			if (data.success) {
				return data.result;
			} else {
				$.messager.alert("提示", "监区树数据获取失败", "info");
				return {};
			}
		};
		var _onClick=options['onClick']!=undefined?options['onClick']:function(node) {
			    var data = {};
			    var s_rybh= $("#s_rybh").textbox('getValue');
				var s_xm= $("#s_xm").textbox('getValue');
				data = {
						 'snbh': s_rybh,
						 'xm': s_xm,
						 "processDefinitionKey":comonts.getUrlParam('processDefinitionKey'),
						 "taskDefinitionKey":comonts.getUrlParam('taskDefinitionKey'),
				}
			if (node.id.length == "2") {
				data["jsh"] = node.id; 
			} else {
				data["jsh"] = node.id;
			}
			
			$('#'+tableId).datagrid('clearSelections');
			$('#'+tableId).datagrid('loadData', { total: 0, rows: [] });
			$('#'+tableId).datagrid('load', data);
		};
		
		$('#'+id).tree({
			url : _url,
			method : _method,
			loadFilter : _loadFilter,
			//鼠标移上事件获取获取监区人数
			onLoadSuccess:function(node,data){
				$(".tree-hit").parent().addClass("treet");
				$(".tree-indent").parent().addClass("treet1");
				var trrId;
		
				$('#'+id+" .tree-node.treet1").bind("mouseover",function(){
					trrId = $(this).attr("id");
					
					var node = document.getElementById(trrId);
					var childrenNode = $('#'+id).tree('getNode',node);
					var qtip = childrenNode.qtip;
					$('#'+id+" .tree-node.treet1").tooltip({
						trackMouse:'true',
						content : '<div style="height: 50px;width:100px">'+
						  	'<div class="top" style="font-size: 12px;margin-bottom: 5px;"></div>'+
							//'<div>监室:'+ childrenNode.text +'</div>'+
							'<div>'+ qtip +'</div></div>',
					});
				});
			},
			
			onClick : _onClick,
		});
	}
	
	var _clickJbxxRightMenu = function(item,data){
		var id = item.id;
		if (id == "see_detail") {
			_initRyxxxx();
            $("#ryjbxxylb").window('open');
            jbxxDetailAssignment(data);
		}else if (id == "see_rygk") {
			
		}
		
	}
	
	
    //鼠标右键弹出框
	var _initJbxxRightMenu=function(id){
		var tmp= require("../../js/tpl/rightmenu.html");
		var htmlcompile = template.compile(tmp);
		var html = htmlcompile({});
		$("#"+id).html(html);
		$.parser.parse($("#"+id));

		//右键查看详细
		if($("#ryjbxxylb")[0]==undefined){
            _initRyxxxx();
		}
		$("#see_detail").on("click",function () {
        	//var rowdata = $("#"+id).datagrid("getSelected");
            $("#ryjbxxylb").window('open');
        })
        //右键管控措施
		if($("#rygkcs")[0]==undefined){
            _initRygk();
		}
		$("#see_rygk").on("click",function () {
        	//var rowdata = $("#"+id).datagrid("getSelected");
            $("#rygkcs").window('open');
        })
	}
	
	var _showJkqkByRybh = function(rybh) {
		$.ajax({
			type: "POST",  
			url: "/jls_showdetails/jkqkAndTmtzList",
			data: {
				"rybh":rybh,
			},
			error: function (XMLHttpRequest, textStatus, errorThrown){  
			    $.messager.alert("确定", "健康检查数据获取失败！", "info");
			},  
			success: function (result) {
				var data = result.data;
				if (result.total != 0) {
					var name;
			        $("#detail_jkqktab input").filter(function(index){
			            return $(this).attr("name")!=undefined
			        }).each(function(){
			            name= $(this).attr("name");
			            if(name!=undefined&&name!=""&&name!=null){
			                $("#detail_jkqkfm_"+name).textbox("setValue",data[name]);
			            }
			        });
				}
			} 
		});
	}
	
	//右键人员基本信息一览表Table
	var _initRyxxxx=function(){
		$("#ryjbxxylb").dialog('destroy');//销毁以前的面板，防止数据缓存
        var ryxxlb = require("../../js/tpl/ryxxlb.html");
        var htmlcompile = template.compile(ryxxlb);
        var html = htmlcompile({});
        $("#ryxxxxid").html(html);
        $.parser.parse($("#ryxxxxid"));
		var rybh = rightMenuRybh;
        $('#datail_tabs').tabs({
            //border:false,
            onSelect:function(title,index){
            	/*
            	 * 健康情况
            	 */
            	if (title=="健康情况") {
            		_showJkqkByRybh(rybh);
				}
            	/*
            	 * 案由变动
            	 */
            	 if(title=="案由变动"){
 					//alert("进来啦~~~~~~~~~~~");
                   comonts.initTable("aybdRecordId",{
                       //title: '延期',
                       height: '100%',
                       url:"/jls_showdetails/jbxxList",
                       firstLoad:true,
                       columns : [{field: 'oid',title: '',/*width: 30,*/formatter: function(value, rowData, rowIndex){
                                   return '<input type="radio" name="rydetails_selectRadio_aybd" id="rydetails_selectRadio_aybd' + rowIndex + '" value="' + rowData.oid + '" />';
                               }},
                            {field : 'ayString',width : 150,title:'案由',sortable:'true',formatter: function(value,row,index){return '<span title='+(row.ayString==null?"":row.ayString)+'>'+(row.ayString==null?"":row.ayString)+'</span>'}},
                   			{field : 'czr',title : '操作人',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.czr==null?"":row.czr)+'>'+(row.czr==null?"":row.czr)+'</span>'}}, 
                   			{field : 'czsj',title : '操作时间',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.czsjString==null?"":row.czsj)+'>'+(row.czsj==null?"":row.czsj)+'</span>'}},
                       ] ,
                       queryParams:{
                    	   "rybh":rybh,
                       },
                       onClickRow:function(rowIndex, rowData){
                    	   var radio = $("input[name='rydetails_selectRadio_aybd']")[rowIndex].disabled;
	           	           if (radio!= true) {
	           	               //让点击的行单选按钮选中
	           	               $("input[name='rydetails_selectRadio_aybd']")[rowIndex].checked = true;
	           	           }
	           	           else {
	           	               $("input[name='rydetails_selectRadio_aybd']")[rowIndex].checked = false;
	           	           }
                       },
                       onLoadSuccess:function(data){
                    	   if(data.total>0){//加载完毕后获取所有的checkbox遍历
                    		   $('#aybdRecordId').datagrid("selectRow", 0);
                    		   $("input[name='rydetails_selectRadio_aybd']")[0].checked = true;
                    	   }	
                       },
                       detailFormatter:function(index,rowData){
                           if(rowData.ayString==null){
                               rowData.ayString=" ";
                           };
                           return '<table><tr><td>案由:'+rowData.ayString+'</td></tr></table>'
                       },
                   });
 			   }
            	 /*
            	  * 历史环节
            	  */
               if(title=="历史环节"){
					//alert("进来啦~~~~~~~~~~~");
                   comonts.initTable("lishjRecordlId",{
                       //title: '延期',
                       height: '100%',
                       url:"/kss_showdetails/hjbdList",
                       firstLoad:true,
                       columns : [{field: 'oid',title: '',/*width: 30,*/formatter: function(value, rowData, rowIndex){
                                   return '<input type="radio" name="rydetails_selectRadio_lishj" id="rydetails_selectRadio_lishj' + rowIndex + '" value="' + rowData.oid + '" />';
                               }},
                           {field : 'bahjString',width : 150,title:'办案阶段',sortable:'true',formatter: function(value,row,index){return '<span title='+value+'>'+value+'</span>'}},
                           {field : 'qsrq',title : '办案环节起始日期',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.qsrq==null?"":row.qsrq)+'>'+(row.qsrq==null?"":row.qsrq)+'</span>'}},
                           {field : 'gyqx',title : '关押期限',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.gyqx==null?"":row.gyqx)+'>'+(row.gyqx==null?"":row.gyqx)+'</span>'}},
                           {field : 'dwlxString',title : '单位类型',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+value+'>'+value+'</span>'}},
                           {field : 'badw',title : '办案单位',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.badw==null?"":row.badw)+'>'+(row.badw==null?"":row.badw)+'</span>'}},
                           {field : 'bar',title : '办案人',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.bar==null?"":row.bar)+'>'+(row.bar==null?"":row.bar)+'</span>'}},
                           {field : 'wsh',title : '文书号',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.wsh==null?"":row.wsh)+'>'+(row.wsh==null?"":row.wsh)+'</span>'}},
                           {field : 'pzdw',title : '批准单位',width : 150,hidden:true,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.pzdw==null?"":row.pzdw)+'>'+(row.pzdw==null?"":row.pzdw)+'</span>'}},
                           {field : 'sfslajString',title : '是否属于律师会见需经许可的案件',width : 150,hidden:true,sortable:'true',formatter: function(value,row,index){return '<span title='+value+'>'+value+'</span>'}},
                           {field : 'sfjdwmString',title : '是否戒毒期限未满',width : 150,hidden:true,sortable:'true',formatter: function(value,row,index){return '<span title='+value+'>'+value+'</span>'}}
                       ] ,
                       queryParams:{
                    	   "rybh":rybh,
                       },
                       onClickRow:function(rowIndex, rowData){
                    	   var radio = $("input[name='rydetails_selectRadio_lishj']")[rowIndex].disabled;
	           	           if (radio!= true) {
	           	               //让点击的行单选按钮选中
	           	               $("input[name='rydetails_selectRadio_lishj']")[rowIndex].checked = true;
	           	           }
	           	           else {
	           	               $("input[name='rydetails_selectRadio_lishj']")[rowIndex].checked = false;
	           	           }
                       },
                       onLoadSuccess:function(data){
                    	   if(data.total>0){//加载完毕后获取所有的checkbox遍历
                    		   $('#lishjRecordlId').datagrid("selectRow", 0);
                    		   $("input[name='rydetails_selectRadio_lishj']")[0].checked = true;
                    	   }	
                       },
                       detailFormatter:function(index,rowData){
                           if(rowData.yqyy==null){
                               rowData.yqyy=" ";
                           };
                           return '<table><tr><td>延期原因:'+rowData.yqyy+'</td></tr><tr><td>备注:'+rowData.bz+'</td></tr></table>'
                       },
                   });
			   }
               /*
                * 刑期变动
                */
               if(title=="刑期变动"){
					//alert("进来啦~~~~~~~~~~~");
                   comonts.initTable("xqbdRecordId",{
                       //title: '刑期变动',
                       height: '100%',
                       url:"/jls_showdetails/jjxList",
                       firstLoad:true,
                       columns : [
                           {
                               field: 'oid',
                               title: '',
                               /*width: 30,*/
                               formatter: function(value, rowData, rowIndex){
                                   return '<input type="radio" name="rydetails_selectRadio_xqbd" id="rydetails_selectRadio_xqbd' + rowIndex + '" value="' + rowData.oid + '" />';
                               }},
                            {field : 'blrq',width : 150,title:'办理日期',sortable:'true',formatter: function(value,row,index){return '<span title='+(row.blrqString==null?"":row.blrq)+'>'+(row.blrq==null?"":row.blrq)+'</span>'}},
                   			{field : 'yxmrq',title : '原刑满日期',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.yxmrq==null?"":row.yxmrq)+'>'+(row.yxmrq==null?"":row.yxmrq)+'</span>'}},
                   			{field : 'jjxq',title : '加减刑期',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.jjxq==null?"":row.jjxq)+'>'+(row.jjxq==null?"":row.jjxq)+'</span>'}},
                   			{field : 'xmsfrq',title : '刑满释放日期',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.xmsfrq==null?"":row.xmsfrq)+'>'+(row.xmsfrq==null?"":row.xmsfrq)+'</span>'}},
                   			{field : 'pzr',title : '批准人',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.pzr==null?"":row.pzr)+'>'+(row.pzr==null?"":row.pzr)+'</span>'}},
                   			{field : 'pzwh',title : '批准文号',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.pzwh==null?"":row.pzwh)+'>'+(row.pzwh==null?"":row.pzwh)+'</span>'}},
                       ] ,
                       queryParams:{
                    	   "rybh":rybh,
                       },
                       onClickRow:function(rowIndex, rowData){
                    	   var radio = $("input[name='rydetails_selectRadio_xqbd']")[rowIndex].disabled;
	           	           if (radio!= true) {
	           	               //让点击的行单选按钮选中
	           	               $("input[name='rydetails_selectRadio_xqbd']")[rowIndex].checked = true;
	           	           }
	           	           else {
	           	               $("input[name='rydetails_selectRadio_xqbd']")[rowIndex].checked = false;
	           	           }
                       },
                       onLoadSuccess:function(data){
                    	   if(data.total>0){//加载完毕后获取所有的checkbox遍历
                    		   $('#xqbdRecordId').datagrid("selectRow", 0);
                    		   $("input[name='rydetails_selectRadio_xqbd']")[0].checked = true;
                    	   }	
                       },
                       detailFormatter:function(index,rowData){
                           if(rowData.pzwh==null){
                               rowData.pzwh=" ";
                           };
                           return '<table><tr><td>批准文号:'+rowData.pzwh+'</td></table>'
                       },
                   });
			   }
               /*
                * 延期信息
                */
               if(title=="延期信息"){
					//alert("进来啦~~~~~~~~~~~");
                   comonts.initTable("yqxxRecordId",{
                       //title: '延期',
                       height: '100%',
                       url:"/jls_showdetails/yqxxList",
                       firstLoad:true,
                       columns : [
                           {
                               field: 'oid',
                               title: '',
                               /*width: 30,*/
                               formatter: function(value, rowData, rowIndex){
                                   return '<input type="radio" name="rydetails_selectRadio_yqxx" id="rydetails_selectRadio_yqxx' + rowIndex + '" value="' + rowData.oid + '" />';
                               }},
                            {field : 'blrq',width : 150,title:'办理日期',sortable:'true',formatter: function(value,row,index){return '<span title='+(row.blrq==null?"":row.blrq)+'>'+(row.blrq==null?"":row.blrq)+'</span>'}},
                   			{field : 'ygyqx',title : '原关押期限',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.ygyqx==null?"":row.ygyqx)+'>'+(row.ygyqx==null?"":row.ygyqx)+'</span>'}},
                   			{field : 'xgyqx',title : '现关押期限',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.xgyqx==null?"":row.xgyqx)+'>'+(row.xgyqx==null?"":row.xgyqx)+'</span>'}},
                   			{field : 'flwsh',title : '法律文书号',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.flwsh==null?"":row.flwsh)+'>'+(row.flwsh==null?"":row.flwsh)+'</span>'}},
                   			{field : 'fzr',title : '负责人',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.fzr==null?"":row.fzr)+'>'+(row.fzr==null?"":row.fzr)+'</span>'}},
                   			{field : 'pzdw',title : '批准单位',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.pzdw==null?"":row.pzdw)+'>'+(row.pzdw==null?"":row.pzdw)+'</span>'}},
                   			{field : 'bz',title : '备注',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.bz==null?"":row.bz)+'>'+(row.bz==null?"":row.bz)+'</span>'}},
                       ] ,
                       queryParams:{
                    	   "rybh":rybh,
                       },
                       onClickRow:function(rowIndex, rowData){
                    	   var radio = $("input[name='rydetails_selectRadio_yqxx']")[rowIndex].disabled;
	           	           if (radio!= true) {
	           	               //让点击的行单选按钮选中
	           	               $("input[name='rydetails_selectRadio_yqxx']")[rowIndex].checked = true;
	           	           }
	           	           else {
	           	               $("input[name='rydetails_selectRadio_yqxx']")[rowIndex].checked = false;
	           	           }
                       },
                       onLoadSuccess:function(data){
                    	   if(data.total>0){//加载完毕后获取所有的checkbox遍历
                    		   $('#yqxxRecordId').datagrid("selectRow", 0);
                    		   $("input[name='rydetails_selectRadio_yqxx']")[0].checked = true;
                    	   }	
                       },
                       detailFormatter:function(index,rowData){
                           if(rowData.bz==null){
                               rowData.bz=" ";
                           };
                           return '<table><tr><td>备注:'+rowData.bz+'</td></table>'
                       },
                   });
			   }
               /*
                * 判决登记
                */
               if(title=="判决登记"){
					//alert("进来啦~~~~~~~~~~~");
                   comonts.initTable("pjdjRecordId",{
                       //title: '延期',
                       height: '100%',
                       url:"/jls_showdetails/pjdjList",
                       firstLoad:true,
                       columns : [
                           {
                               field: 'oid',
                               title: '',
                               /*width: 30,*/
                               formatter: function(value, rowData, rowIndex){
                                   return '<input type="radio" name="rydetails_selectRadio_pjdj" id="rydetails_selectRadio_pjdj' + rowIndex + '" value="' + rowData.oid + '" />';
                               }},
                            {field : 'pjrq',width : 150,title:'判决日期',sortable:'true',formatter: function(value,row,index){return '<span title='+(row.pjrq==null?"":row.pjrq)+'>'+(row.pjrq==null?"":row.pjrq)+'</span>'}},
                   			{field : 'pjdwString',title : '判决单位',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.pjdwString==null?"":row.pjdwString)+'>'+(row.pjdwString==null?"":row.pjdwString)+'</span>'}},
                   			{field : 'wsh',title : '文书号',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.wsh==null?"":row.wsh)+'>'+(row.wsh==null?"":row.wsh)+'</span>'}},
                   			{field : 'cljg',title : '处理结果',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.cljgString==null?"":row.cljgString)+'>'+(row.cljgString==null?"":row.cljgString)+'</span>'}},
                   			{field : 'fjxString',title : '附加刑',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.fjxString==null?"":row.fjxString)+'>'+(row.fjxString==null?"":row.fjxString)+'</span>'}},
                   			{field : 'xq',title : '刑期',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.xq==null?"":row.xq)+'>'+(row.xq==null?"":row.xq)+'</span>'}},
                       ] ,
                       queryParams:{
                    	   "rybh":rybh,
                       },
                       onClickRow:function(rowIndex, rowData){
                    	   var radio = $("input[name='rydetails_selectRadio_pjdj']")[rowIndex].disabled;
	           	           if (radio!= true) {
	           	               //让点击的行单选按钮选中
	           	               $("input[name='rydetails_selectRadio_pjdj']")[rowIndex].checked = true;
	           	           }
	           	           else {
	           	               $("input[name='rydetails_selectRadio_pjdj']")[rowIndex].checked = false;
	           	           }
                       },
                       onLoadSuccess:function(data){
                    	   if(data.total>0){//加载完毕后获取所有的checkbox遍历
                    		   $('#pjdjRecordId').datagrid("selectRow", 0);
                    		   $("input[name='rydetails_selectRadio_pjdj']")[0].checked = true;
                    	   }	
                       },
                       detailFormatter:function(index,rowData){
                           if(rowData.cljgString==null){
                               rowData.cljgString=" ";
                           };
                           return '<table><tr><td>处理结果:'+rowData.cljgString+'</td></table>'
                       },
                   });
			   }
               /*
                * 提审登记
                */
               if(title=="提审登记"){
                   comonts.initTable("tsdjRecordId",{
                       //title: '提审登记',
                       height: '100%',
                       url:"/jls_showdetails/tsdjList",
                       firstLoad:true,
                       columns : [
                           {
                               field: 'oid',
                               title: '',
                               /*width: 30,*/
                               formatter: function(value, rowData, rowIndex){
                                   return '<input type="radio" name="rydetails_selectRadio_tsdj" id="rydetails_selectRadio_tsdj' + rowIndex + '" value="' + rowData.oid + '" />';
                               }},
                            {field : 'dwString',width : 150,title:'提审单位',sortable:'true',formatter: function(value,row,index){return '<span title='+(row.dwString==null?"":row.dwString)+'>'+(row.dwString==null?"":row.dwString)+'</span>'}},
                   			{field : 'ry',title : '提审人员',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.ry==null?"":row.ry)+'>'+(row.ry==null?"":row.ry)+'</span>'}}, 
                   			{field : 'zjlxString',title : '证件类型',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.zjlxString==null?"":row.zjlxString)+'>'+(row.zjlxString==null?"":row.zjlxString)+'</span>'}},
                   			{field : 'zjh',title : '证件号',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.zjh==null?"":row.zjh)+'>'+(row.zjh==null?"":row.zjh)+'</span>'}},
                   			{field : 'kssj',title : '开始时间',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.kssj==null?"":row.kssj)+'>'+(row.kssj==null?"":row.kssj)+'</span>'}},
                   			{field : 'jssj',title : '结束时间',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.jssj==null?"":row.jssj)+'>'+(row.jssj==null?"":row.jssj)+'</span>'}},
                   			{field : 'jsr',title : '收监民警',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.jsr==null?"":row.jsr)+'>'+(row.jsr==null?"":row.jsr)+'</span>'}},
                       ] ,
                       queryParams:{
                    	   "rybh":rybh,
                       },
                       onClickRow:function(rowIndex, rowData){
                    	   var radio = $("input[name='rydetails_selectRadio_tsdj']")[rowIndex].disabled;
	           	           if (radio!= true) {
	           	               //让点击的行单选按钮选中
	           	               $("input[name='rydetails_selectRadio_tsdj']")[rowIndex].checked = true;
	           	           }
	           	           else {
	           	               $("input[name='rydetails_selectRadio_tsdj']")[rowIndex].checked = false;
	           	           }
                       },
                       onLoadSuccess:function(data){
                    	   if(data.total>0){//加载完毕后获取所有的checkbox遍历
                    		   $('#tsdjRecordId').datagrid("selectRow", 0);
                    		   $("input[name='rydetails_selectRadio_tsdj']")[0].checked = true;
                    	   }	
                       },
                       detailFormatter:function(index,rowData){
                           if(rowData.jsr==null){
                               rowData.jsr=" ";
                           };
                           return '<table><tr><td>收监民警:'+rowData.jsr+'</td></table>'
                       },
                   });
			   }
               /*
                * 律师会见
                */
               if(title=="律师会见"){
                   comonts.initTable("lvshjRecordId",{
                       height: '100%',
                       url:"/jls_showdetails/lvshjList",
                       firstLoad:true,
                       columns : [
                           {
                               field: 'oid',
                               title: '',
                               /*width: 30,*/
                               formatter: function(value, rowData, rowIndex){
                                   return '<input type="radio" name="rydetails_selectRadio_lvshj" id="rydetails_selectRadio_lvshj' + rowIndex + '" value="' + rowData.oid + '" />';
                               }},
                            {field : 'lsxm',width : 150,title:'律师姓名',sortable:'true',formatter: function(value,row,index){return '<span title='+(row.lsxm==null?"":row.lsxm)+'>'+(row.lsxm==null?"":row.lsxm)+'</span>'}},
                   			{field : 'zjh',title : '证件号',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.v==null?"":row.zjh)+'>'+(row.zjh==null?"":row.zjh)+'</span>'}}, 
                   			{field : 'dwString',title : '律师单位',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.dwString==null?"":row.dwString)+'>'+(row.dwString==null?"":row.dwString)+'</span>'}},
                   			{field : 'rs',title : '人数',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.rs==null?"":row.rs)+'>'+(row.rs==null?"":row.rs)+'</span>'}},
                   			{field : 'hjsj',title : '会见时间',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.hjsj==null?"":row.hjsj)+'>'+(row.hjsj==null?"":row.hjsjString)+'</span>'}},
                       ] ,
                       queryParams:{
                    	   "rybh":rybh,
                       },
                       onClickRow:function(rowIndex, rowData){
                    	   var radio = $("input[name='rydetails_selectRadio_lvshj']")[rowIndex].disabled;
	           	           if (radio!= true) {
	           	               //让点击的行单选按钮选中
	           	               $("input[name='rydetails_selectRadio_lvshj']")[rowIndex].checked = true;
	           	           }
	           	           else {
	           	               $("input[name='rydetails_selectRadio_lvshj']")[rowIndex].checked = false;
	           	           }
                       },
                       onLoadSuccess:function(data){
                    	   if(data.total>0){//加载完毕后获取所有的checkbox遍历
                    		   $('#lvshjRecordId').datagrid("selectRow", 0);
                    		   $("input[name='rydetails_selectRadio_lvshj']")[0].checked = true;
                    	   }	
                       },
                       detailFormatter:function(index,rowData){
                           if(rowData.dwString==null){
                               rowData.dwString=" ";
                           };
                           return '<table><tr><td>律师单位:'+rowData.dwString+'</td></table>'
                       },
                   });
			   }
               /*
                * 同案犯
                */
               if(title=="同案犯"){
                   comonts.initTable("tafRecordId",{
                       //title: '同案犯',
                       height: '100%',
                       url:"/jls_showdetails/tafList",
                       firstLoad:true,
                       columns : [
                           {
                               field: 'oid',
                               title: '',
                               /*width: 30,*/
                               formatter: function(value, rowData, rowIndex){
                                   return '<input type="radio" name="rydetails_selectRadio_taf" id="rydetails_selectRadio_taf' + rowIndex + '" value="' + rowData.oid + '" />';
                               }},
                            {field : 'rybg',width : 150,title:'人员编号',sortable:'true',formatter: function(value,row,index){return '<span title='+(row.rybg==null?"":row.rybg)+'>'+(row.rybg==null?"":row.rybg)+'</span>'}},
                   			{field : 'xm',title : '姓名',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.xm==null?"":row.xm)+'>'+(row.xm==null?"":row.xm)+'</span>'}}, 
                   			{field : 'jsh',title : '监室号',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.jsh==null?"":row.jsh)+'>'+(row.jsh==null?"":row.jsh)+'</span>'}},
                   			{field : 'tafh',title : '同案犯号',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.tafh==null?"":row.tafh)+'>'+(row.tafh==null?"":row.tafh)+'</span>'}},
                       ] ,
                       queryParams:{
                    	   "rybh":rybh,
                       },
                       onClickRow:function(rowIndex, rowData){
                    	   var radio = $("input[name='rydetails_selectRadio_taf']")[rowIndex].disabled;
	           	           if (radio!= true) {
	           	               //让点击的行单选按钮选中
	           	               $("input[name='rydetails_selectRadio_taf']")[rowIndex].checked = true;
	           	           }
	           	           else {
	           	               $("input[name='rydetails_selectRadio_taf']")[rowIndex].checked = false;
	           	           }
                       },
                       onLoadSuccess:function(data){
                    	   if(data.total>0){//加载完毕后获取所有的checkbox遍历
                    		   $('#tafRecordId').datagrid("selectRow", 0);
                    		   $("input[name='rydetails_selectRadio_taf']")[0].checked = true;
                    	   }	
                       },
                       detailFormatter:function(index,rowData){
                           if(rowData.tafh==null){
                               rowData.tafh=" ";
                           };
                           return '<table><tr><td>同案犯号:'+rowData.tafh+'</td></table>'
                       },
                   });
			   }
               /*
                * 就医信息
                */
               if(title=="就医信息"){
                   comonts.initTable("jyxxRecordId",{
                       //title: '就医信息',
                       height: '100%',
                       url:"/jls_showdetails/jyxxList",
                       firstLoad:true,
                       columns : [
                           {
                               field: 'oid',
                               title: '',
                               /*width: 30,*/
                               formatter: function(value, rowData, rowIndex){
                                   return '<input type="radio" name="rydetails_selectRadio_jyxx" id="rydetails_selectRadio_jyxx' + rowIndex + '" value="' + rowData.oid + '" />';
                               }},
                            {field : 'zdrq',width : 150,title:'诊断日期',sortable:'true',formatter: function(value,row,index){return '<span title='+(row.zdrq==null?"":row.zdrq)+'>'+(row.zdrq==null?"":row.zdrq)+'</span>'}},
                   			{field : 'ysxm',title : '医生',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.ysxm==null?"":row.ysxm)+'>'+(row.ysxm==null?"":row.ysxm)+'</span>'}}, 
                   			{field : 'brzs',title : '自述',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.brzs==null?"":row.brzs)+'>'+(row.brzs==null?"":row.brzs)+'</span>'}},
                   			{field : 'yszd',title : '医生诊断',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.yszd==null?"":row.yszd)+'>'+(row.yszd==null?"":row.yszd)+'</span>'}},
                   			{field : 'cljg',title : '处理结果',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.cljg==null?"":row.cljg)+'>'+(row.cljg==null?"":row.cljg)+'</span>'}},
                   			{field : 'csjylxString',title : '就医类型',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.csjylxString==null?"":row.csjylxString)+'>'+(row.csjylxString==null?"":row.csjylxString)+'</span>'}},
                       ] ,
                       queryParams:{
                    	   "rybh":rybh,
                       },
                       onClickRow:function(rowIndex, rowData){
                    	   var radio = $("input[name='rydetails_selectRadio_jyxx']")[rowIndex].disabled;
	           	           if (radio!= true) {
	           	               //让点击的行单选按钮选中
	           	               $("input[name='rydetails_selectRadio_jyxx']")[rowIndex].checked = true;
	           	           }
	           	           else {
	           	               $("input[name='rydetails_selectRadio_jyxx']")[rowIndex].checked = false;
	           	           }
                       },
                       onLoadSuccess:function(data){
                    	   if(data.total>0){//加载完毕后获取所有的checkbox遍历
                    		   $('#jyxxRecordId').datagrid("selectRow", 0);
                    		   $("input[name='rydetails_selectRadio_jyxx']")[0].checked = true;
                    	   }	
                       },
                       detailFormatter:function(index,rowData){
                           if(rowData.brzs==null){
                               rowData.brzs=" ";
                           };
                           return '<table><tr><td>自述:'+rowData.brzs+'</td></table>'
                       },
                   });
			   }
               /*
                * 加减分记录
                */
               if(title=="加减分记录"){
					//alert("进来啦~~~~~~~~~~~");
                   comonts.initTable("jjfjlRecordId",{
                       //title: '加减分记录',
                       height: '100%',
                       url:"/jls_showdetails/jkfjlList",
                       firstLoad:true,
                       columns : [
                           {
                               field: 'oid',
                               title: '',
                               /*width: 30,*/
                               formatter: function(value, rowData, rowIndex){
                                   return '<input type="radio" name="rydetails_selectRadio_jjfjl" id="rydetails_selectRadio_jjfjl' + rowIndex + '" value="' + rowData.oid + '" />';
                               }},
                                {field : 'blsj',width : 150,title:'考核时间',sortable:'true',formatter: function(value,row,index){return '<span title='+(row.blsj==null?"":row.blsj)+'>'+(row.blsj==null?"":row.blsj)+'</span>'}},
	                   			{field : 'jkfz',title : '加减分数',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.jkfz==null?"":row.jkfz)+'>'+(row.jkfz==null?"":row.jkfz)+'</span>'}}, 
	                   			{field : 'khr',title : '考核人',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.khr==null?"":row.khr)+'>'+(row.khr==null?"":row.khr)+'</span>'}},
	                   			{field : 'khmk',title : '考核模块',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.khmk==null?"":row.khmk)+'>'+(row.khmk==null?"":row.khmk)+'</span>'}},
	                   			{field : 'jkfsy',title : '加减分原因',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.jkfsy==null?"":row.jkfsy)+'>'+(row.jkfsy==null?"":row.jkfsy)+'</span>'}},
                       ] ,
                       queryParams:{
                    	   "rybh":rybh,
                       },
                       onClickRow:function(rowIndex, rowData){
                    	   var radio = $("input[name='rydetails_selectRadio_jjfjl']")[rowIndex].disabled;
	           	           if (radio!= true) {
	           	               //让点击的行单选按钮选中
	           	               $("input[name='rydetails_selectRadio_jjfjl']")[rowIndex].checked = true;
	           	           }
	           	           else {
	           	               $("input[name='rydetails_selectRadio_jjfjl']")[rowIndex].checked = false;
	           	           }
                       },
                       onLoadSuccess:function(data){
                    	   if(data.total>0){//加载完毕后获取所有的checkbox遍历
                    		   $('#jjfjlRecordId').datagrid("selectRow", 0);
                    		   $("input[name='rydetails_selectRadio_jjfjl']")[0].checked = true;
                    	   }	
                       },
                       detailFormatter:function(index,rowData){
                           if(rowData.jjfyy==null){
                               rowData.jjfyy=" ";
                           };
                           return '<table><tr><td>加减分原因:'+rowData.jjfyy+'</td></table>'
                       },
                   });
			   }
               /*
                * 调监记录
                */
               if(title=="调监记录"){
                   comonts.initTable("djjlRecordId",{
                       height: '100%',
                       url:"/jls_showdetails/jstzList",
                       firstLoad:true,
                       columns : [
                           {
                               field: 'oid',
                               title: '',
                               /*width: 30,*/
                               formatter: function(value, rowData, rowIndex){
                                   return '<input type="radio" name="rydetails_selectRadio_jstz" id="rydetails_selectRadio_jstz' + rowIndex + '" value="' + rowData.oid + '" />';
                               }},
                            {field : 'yjsh',width : 150,title:'原监室号',sortable:'true',formatter: function(value,row,index){return '<span title='+(row.yjsh==null?"":row.yjsh)+'>'+(row.yjsh==null?"":row.yjsh)+'</span>'}},
                   			{field : 'xjsh',title : '现监室号',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.xjsh==null?"":row.xjsh)+'>'+(row.xjsh==null?"":row.xjsh)+'</span>'}}, 
                   			{field : 'djr',title : '调监人',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.djr==null?"":row.djr)+'>'+(row.djr==null?"":row.djr)+'</span>'}},
                   			{field : 'tzsj',title : '调整时间',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.tzsj==null?"":row.tzsj)+'>'+(row.tzsj==null?"":row.tzsj)+'</span>'}},
                       ] ,
                       queryParams:{
                    	   "rybh":rybh,
                       },
                       onClickRow:function(rowIndex, rowData){
                    	   var radio = $("input[name='rydetails_selectRadio_jstz']")[rowIndex].disabled;
	           	           if (radio!= true) {
	           	               //让点击的行单选按钮选中
	           	               $("input[name='rydetails_selectRadio_jstz']")[rowIndex].checked = true;
	           	           }
	           	           else {
	           	               $("input[name='rydetails_selectRadio_jstz']")[rowIndex].checked = false;
	           	           }
                       },
                       onLoadSuccess:function(data){
                    	   if(data.total>0){//加载完毕后获取所有的checkbox遍历
                    		   $('#djjlRecordId').datagrid("selectRow", 0);
                    		   $("input[name='rydetails_selectRadio_jstz']")[0].checked = true;
                    	   }	
                       },
                   });
			   }
               /*
                * 五项体检
                */
               if(title=="五项体检"){
					//alert("进来啦~~~~~~~~~~~");
                   comonts.initTable("wxtjRecordId",{
                       //title: '延期',
                       height: '100%',
                       url:"/jls_showdetails/wxjcList",
                       firstLoad:true,
                       columns : [
                           {
                               field: 'oid',
                               title: '',
                               /*width: 30,*/
                               formatter: function(value, rowData, rowIndex){
                                   return '<input type="radio" name="rydetails_selectRadio_wxtj" id="rydetails_selectRadio_wxtj' + rowIndex + '" value="' + rowData.oid + '" />';
                               }},
                            {field : 'xcg',width : 150,title:'血常规',sortable:'true',formatter: function(value,row,index){return '<span title='+(row.xcg==null?"":row.xcg)+'>'+(row.xcg==null?"":row.xcg)+'</span>'}},
                   			{field : 'xdt',title : '心电图',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.xdt==null?"":row.xdt)+'>'+(row.xdt==null?"":row.xdt)+'</span>'}}, 
                   			{field : 'bc',title : 'B超',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.bc==null?"":row.bc)+'>'+(row.BC==null?"":row.bc)+'</span>'}},
                   			{field : 'zq',title : '脏器',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.zq==null?"":row.v)+'>'+(row.zq==null?"":row.zq)+'</span>'}},
                   			{field : 'xp',title : '胸片',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.xp==null?"":row.xp)+'>'+(row.xp==null?"":row.xp)+'</span>'}},
                   			{field : 'jcys',title : '检查人',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.jcys==null?"":row.jcys)+'>'+(row.jcys==null?"":row.jcys)+'</span>'}},
                   			{field : 'ysjcrq',title : '检查时间',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.ysjcrq==null?"":row.ysjcrq)+'>'+(row.ysjcrq==null?"":row.ysjcrq)+'</span>'}},
                   			{field : 'jclxString',title : '检查类型',width : 150,sortable:'true',formatter: function(value,row,index){return '<span title='+(row.jclxString==null?"":row.jclxString)+'>'+(row.jclxString==null?"":row.jclxString)+'</span>'}},
                       ] ,
                       queryParams:{
                    	   "rybh":rybh,
                       },
                       onClickRow:function(rowIndex, rowData){
                    	   var radio = $("input[name='rydetails_selectRadio_wxtj']")[rowIndex].disabled;
	           	           if (radio!= true) {
	           	               //让点击的行单选按钮选中
	           	               $("input[name='rydetails_selectRadio_wxtj']")[rowIndex].checked = true;
	           	           }
	           	           else {
	           	               $("input[name='rydetails_selectRadio_wxtj']")[rowIndex].checked = false;
	           	           }
                       },
                       onLoadSuccess:function(data){
                    	   if(data.total>0){//加载完毕后获取所有的checkbox遍历
                    		   $('#wxtjRecordId').datagrid("selectRow", 0);
                    		   $("input[name='rydetails_selectRadio_wxtj']")[0].checked = true;
                    	   }	
                       },
                       detailFormatter:function(index,rowData){
                           if(rowData.jclxString==null){
                               rowData.jclxString=" ";
                           };
                           return '<table><tr><td>检查类型:'+rowData.jclxString+'</td></table>'
                       },
                   });
			   }
            }
        });
	}
	
	//右键管控措施
	var _initRygk=function(id){
		 var rygkcsxx = require("../../js/tpl/rygkcsxx.html");
	     var htmlcompile = template.compile(rygkcsxx);
	     var html = htmlcompile({});
	     $("#rygkcsxxid").html(html);
	     $.parser.parse($("#rygkcsxxid"));
//		   $('#rygkId').datagrid({
//				width : '100%',
//				fitColumns : true,
//				method:'post',
//				border:false,
//				singleSelect:true,
//				fit:true,
//				fitColumns:true,
//		        url:'',
//				// 对应json数据中的每一列
//				columns : [
//		        	{field: 'oid',title: '',formatter: function(value, rowData, rowIndex){return '<input type="radio" name="selectRadio" id="selectRadio"' + rowIndex + 'value="' + rowData.oid + '" />';}},		
//				 	{field : 'gkcs',width : 150,title:'管控措施',sortable:'true',formatter: function(value,row,index){return '<span title='+value+'>'+value+'</span>'}},		
//				 	{field : 'lszt',width : 150,title:'落实状态(SHFO) 0 未落实 1 已落实',sortable:'true',formatter: function(value,row,index){return '<span title='+value+'>'+value+'</span>'}},		
//				 	{field : 'lssj',width : 150,title:'落实时间',sortable:'true',formatter: function(value,row,index){return '<span title='+value+'>'+value+'</span>'}},		
//				 	{field : 'lsr',width : 150,title:'落实人',sortable:'true',formatter: function(value,row,index){return '<span title='+value+'>'+value+'</span>'}},		
//				 	{field : 'lsqk',width : 150,title:'落实情况',sortable:'true',formatter: function(value,row,index){return '<span title='+value+'>'+value+'</span>'}},		
//				 	{field : 'zzr',width : 150,title:'责任人',sortable:'true',formatter: function(value,row,index){return '<span title='+value+'>'+value+'</span>'}},		
//				 	{field : 'gklx',width : 150,title:'管控类型(GKLX) 1必要措施 2选择措施',sortable:'true',formatter: function(value,row,index){return '<span title='+value+'>'+value+'</span>'}},		
//	    ],
//				loadMsg : '加载中, 请  稍  等  …',
//				pagination : true,
////				view : detailview,
//				detailFormatter:function(index,rowData){
//				    	if(rowData.bz==null){
//				       		rowData.bz=" ";
//				       	 }
//				      return '<table><tr><td>备注:'+rowData.bz+'</td></tr></table>'
//				    },
//				 //单击行选中取消事件
//				   onClickRow: function (rowIndex, rowData) {
//					   if(id!=rowData.id){
//				   			$("input[name='selectRadio']")[rowIndex].checked = true;
//							$('#lswgDetailId').datagrid("selectRow", rowIndex);
//							id=rowData.id;
//				   		}else if(id==rowData.id){
//				   			$('#lswgDetailId').datagrid("unselectRow",rowIndex);
//					        $("input[name='selectRadio']")[rowIndex].checked = false;
//					        id="";
//				   		}
//		        },
//				onLoadSuccess: function(data){//加载完毕后获取所有的checkbox遍历
//					
//					}
//
//				});
	     $('#rygkTable').datagrid("options").url='/jls_fxpgRygkcs/fxpgRygkcsList';
			$('#rygkTable').datagrid('load',{
			"pageSize" : function(){  
			   return $('#rygkTable').datagrid("getPager").pagination("options").pageSize;  
			   },  
			"pageIndex" : function(){  
			   return $('#rygkTable').datagrid("getPager").pagination("options").pageNumber;  
			   }  
});
	     bindAction();
	}
	//右键管控措施关闭事件
	var bindAction=function(){
		$("#gkSelect_cancel").on("click",function(){
			$("#rygkcs").dialog("close");
		});
	}
	var jbxxDetailAssignment = function(data){
		var name;
        $(".detail_jbxxfm input").filter(function(index){
            return $(this).attr("name")!=undefined
        }).each(function(){
            name= $(this).attr("name");
            if(name!=undefined&&name!=""&&name!=null){
                $("#detail_jbxxfm_"+name).textbox("setValue",data[name]);
            }

        });
	}
    var _jbxxxxShow = function(gcbh,rybh,text){
        var query = window.location.host;
        url="/jls_jbxxxx/index.html?rybh="+rybh+"&gcbh="+gcbh
        OpenWindow=window.open(url, text,'','location=no');
        var content = '<iframe scrolling="auto" frameborder="0"  src="' + url + '" style="width:100%;height:100%;"></iframe>';
        OpenWindow.document.write("<HTML>")
        OpenWindow.document.write("<TITLE>"+text+"</TITLE>")
        OpenWindow.document.write("<BODY BGCOLOR=#ffffff>")
        OpenWindow.document.write(content)
        OpenWindow.document.write("</BODY>")
        OpenWindow.document.write("</HTML>")
        OpenWindow.document.close()
        //jbxxDetailAssignment(data);
    }

    var _zjryClick = function(rowdata){
        var data = {
            name: rowdata.xm,
            dabh: rowdata.gcbh,
            jsh: rowdata.jsh
        }
        var lenght=$("#zjrytable").datagrid().length;
        if(lenght>0){
            var datas=$("#zjrytable").datagrid('getRows');
            var str1 = JSON.stringify(datas);
            var str2 = JSON.stringify(data);
            var index = -1;
            if(str1 != null){
                index = str1.indexOf(str2);
            }
            if(index < 0){
                $("#zjrytable").datagrid('insertRow',{
                    row:data
                });
            }
        }
    }

	return{
        initJbxxxx:_jbxxxxShow,
		initJbxxTable:_initJbxx,
		initJsTree: _initJsTree,
		initLcJsTree:_initLcJsTree,
		initJbxxRightMenu:_initJbxxRightMenu,
        zjryClick:_zjryClick,

	}
});